Clover icon

compiler

  1. Project Clover database Mon Jan 2 2023 15:09:37 MST
  2. Package com.google.javascript.rhino.jstype

File SimpleSlot.java

 

Coverage histogram

../../../../../img/srcFileCovDistChart9.png
54% of files have more coverage

Code metrics

0
8
6
1
88
34
6
0.75
1.33
6
1

Classes

Class Line # Actions
SimpleSlot 51 8 6 2
0.8571428785.7%
 

Contributing tests

This file is covered by 3587 tests. .

Source view

1    /*
2    *
3    * ***** BEGIN LICENSE BLOCK *****
4    * Version: MPL 1.1/GPL 2.0
5    *
6    * The contents of this file are subject to the Mozilla Public License Version
7    * 1.1 (the "License"); you may not use this file except in compliance with
8    * the License. You may obtain a copy of the License at
9    * http://www.mozilla.org/MPL/
10    *
11    * Software distributed under the License is distributed on an "AS IS" basis,
12    * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13    * for the specific language governing rights and limitations under the
14    * License.
15    *
16    * The Original Code is Rhino code, released
17    * May 6, 1999.
18    *
19    * The Initial Developer of the Original Code is
20    * Netscape Communications Corporation.
21    * Portions created by the Initial Developer are Copyright (C) 1997-1999
22    * the Initial Developer. All Rights Reserved.
23    *
24    * Contributor(s):
25    * Bob Jervis
26    * Google Inc.
27    *
28    * Alternatively, the contents of this file may be used under the terms of
29    * the GNU General Public License Version 2 or later (the "GPL"), in which
30    * case the provisions of the GPL are applicable instead of those above. If
31    * you wish to allow use of your version of this file only under the terms of
32    * the GPL and not to allow others to use your version of this file under the
33    * MPL, indicate your decision by deleting the provisions above and replacing
34    * them with the notice and other provisions required by the GPL. If you do
35    * not delete the provisions above, a recipient may use your version of this
36    * file under either the MPL or the GPL.
37    *
38    * ***** END LICENSE BLOCK ***** */
39   
40    package com.google.javascript.rhino.jstype;
41   
42    import com.google.javascript.rhino.JSDocInfo;
43   
44    import java.io.Serializable;
45   
46    /**
47    * The minimum implementation of StaticSlot<JSType>.
48    *
49    * @author nicksantos@google.com (Nick Santos)
50    */
 
51    public class SimpleSlot implements StaticSlot<JSType>, Serializable {
52    private static final long serialVersionUID = 1L;
53   
54    final String name;
55    final JSType type;
56    final boolean inferred;
57   
 
58  105167 toggle public SimpleSlot(String name, JSType type, boolean inferred) {
59  105167 this.name = name;
60  105167 this.type = type;
61  105167 this.inferred = inferred;
62    }
63   
 
64  260725 toggle @Override
65    public String getName() {
66  260725 return name;
67    }
68   
 
69  171651 toggle @Override
70    public JSType getType() {
71  171651 return type;
72    }
73   
 
74  6410 toggle @Override
75    public boolean isTypeInferred() {
76  6410 return inferred;
77    }
78   
 
79  12 toggle @Override
80    public StaticReference<JSType> getDeclaration() {
81  12 return null;
82    }
83   
 
84  0 toggle @Override
85    public JSDocInfo getJSDocInfo() {
86  0 return null;
87    }
88    }